//
// Created by neo on 10/21/17.
//

#include <stdio.h>
#include <assert.h>

int array_test(){

    int a[5] = {1,2,3,4,5};

    printf("%x\n",a);

    printf("%d\n",2[a]);

}


//void   my_string_copy(char [] buffer, char const * string)
void   my_string_copy(char * buffer, char const * string){
    assert(string != NULL);
    assert(buffer != NULL);
    while ( (*buffer++ = *string ++) != '\0'){
        ;
    }

}
void point_array(){


    char * api [10] = {"bb","cc","aa"};
    printf("%d\n",sizeof(api)/ sizeof(api[0]));
}


int main_array(int argc, char ** argv){
    array_test();

    char buffer [10];
    char string [] = "Hello";

    my_string_copy(buffer,string);
    printf("%s\n",string);
    printf("%s\n",buffer);

    point_array();
}



